<!--内容区开始-->
 <div class="cont"  >
 <ng-include src="'views/comm/usertab.html'" class="ui row"></ng-include>
 <div class="ui bottom attached segment " style=" border: none">
                <div class="menus" >            
                	<div class="menus_top">
                        <div class="menus_l"><img alt="查看方式图标" src="dist/images/zt.png">查看方式</div>
                        <!--tag标题-->
                        <ul id="nav" >
                            <li><a href="javascript:;"   ng-if="search_param.audit == -1"  class="selected" >全部</a></li>
                            <li><a href="javascript:;"   ng-if="search_param.audit != -1"  ng-click="search_audit(-1)" >全部</a></li>
                            <li><a href="javascript:;" ng-if="search_param.audit == 1"  href="javascript:;" class="selected">审核成功</a></li>
                            <li><a ng-if="search_param.audit != 1"  href="javascript:;" ng-click="search_audit(1)">审核成功</a></li>
                            <li><a ng-if="search_param.audit == 2"  class="selected" href="javascript:;">审核失败</a></li>
                            <li><a ng-if="search_param.audit != 2"   href="javascript:;"  ng-click="search_audit(2)">审核失败</a></li>
                            <li><a ng-if="search_param.audit == 0"  class="selected" href="javascript:;">待审核</a></li>
                            <li><a ng-if="search_param.audit != 0" href="javascript:;"  ng-click="search_audit(0)">待审核</a></li>                   
                        </ul>
                        <ol style="margin-top:0px;margin-bottom:0px;">
                         <!--点击“新增查账”按钮出现弹框--> 
                         <li><a ng-click="newOrder()" href="javascript:;" tabindex="0" class="btn">添加新单查账</a></li> 
                            <li><a ng-click="xufeiOrder()" href="javascript:;" tabindex="0">添加续费查账</a></li>
                            <li><a ng-click="feedback()" href="javascript:;" tabindex="0">添加退款查账</a></li>
                        </ol>                    
                    </div>
                    <!--tag内容区-->
                    <div class="menus_con">
                        <ul style="padding-left:0px;">
        					<li >
                                <label for="textfield" class="li_lable">付款人</label>
                                <input type="text" ng-model="search_param.name" ng-keypress="enterSearch( $event )" placeholder="付款人">
                            </li>
 							<li >
                                <label for="textfield" class="li_lable">昵称/电话/微信</label>
                                <input type="text" ng-model="search_param.phone"  ng-keypress="enterSearch( $event )" placeholder="电话号码">
                            </li>
                            <li>
                                <!-- <label for="textfield" class="li_lable" style="float:left;">查账时间</label> -->
                                <input type="text2" name="starttime" id="starttime"  ng-model="search_param.stime" datetimepicker format='YYYY-MM-DD'   ng-keypress="enterSearch( $event )" class="input_text" placeholder="开始时间">
                                <label for="textfield" class="li_lable" style="float:left;">查账时间</label>
                                <input type="text2" name="endtime" id="endtime" ng-model="search_param.etime"  datetimepicker format='YYYY-MM-DD'  ng-keypress="enterSearch( $event )" class="input_text" placeholder="结束时间">
                            </li>    
                                <a ng-click="getPaysList()">查找</a>
                        </ul>  
                      
                    </div>
                    <div class="menus_table"><!--表格-->

            					<table class="ui column table">
                					  <thead>
                						  <tr>
                							 <th>提交时间</th>
                							 <th>付款人</th>
                							 <th>付款金额</th>
                							 <th>付款时间</th>
                							 <th>付款方式</th>
                							 <th>查账类型</th>
                							 <th>备注</th>
                							 <th>审核结果</th>
                							 <th>操作</th>
                							 <th>&nbsp;</th>
                						  </tr>
                					  </thead>
                					  <tbody>
                    	                    <tr ng-repeat="vpay in payslist">
                    	                        <td>{{vpay.create_time}}</td>
                    	                        <td>{{vpay.pay_name}}</td>
                    	                        <td><span style="font-weight:bold;font-size:19px;">{{vpay.pay_mount}}</span></td>
                    	                        <td>{{vpay.pay_time}}</td>
                    	                        <td>{{vpay.pay_way}}</td>
                    	                        <td ng-if="vpay.pay_type == 1">新单</td>
                    	                        <td ng-if="vpay.pay_type == 2">续费</td>
                    	                        <td ng-if="vpay.pay_type == 3">退款</td>                        
                    	                        <td ng-if="vpay.pay_type !=1 && vpay.pay_type != 2 && vpay.pay_type != 3">未知</td>
                    	                        <td>{{vpay.note}}</td>
                    	                        <td ng-if="vpay.audit_res == 0" >未审核</td>
                    	                        <td ng-if="vpay.audit_res == 1" >审核通过</td>
                    	                        <td ng-if="vpay.audit_res == 2" >
                    	                        审核失败 : {{vpay.audit_msg}}
                    	                        </td>
                    	                        <td ng-if="vpay.audit_res == 0 || vpay.audit_res == 2" >
                    	                            <span ng-if = "vpay.pay_type == 0 || vpay.pay_type == 1">
                    	                                <a href="javascript:;" title="编辑新单查账信息"  ng-click="editOrder()">
                    	                                    <img alt="编辑方式图标" src="dist/images/edit.png">
                    	                                </a>                             
                    	                            </span>
                    	                            <span ng-if = "vpay.pay_type == 2">
                    	                                <a href="javascript:;" title="编辑续费查账信息"  ng-click="editxufeiOrder()">
                    	                                    <img alt="编辑方式图标" src="dist/images/edit.png">
                    	                                </a>                                  
                    	                            </span>
                    	                            <span ng-if = "vpay.pay_type == 3">
                    	                                <a href="javascript:;" title="编辑退款查账信息"  ng-click="returnOrder()">
                    	                                    <img alt="编辑方式图标" src="dist/images/edit.png">
                    	                                </a>                                
                    	                            </span>
                                                </td>
                                                <td ng-if="vpay.audit_res == 0 || vpay.audit_res == 2">
                    	                            <a href="javascript:;" title="删除查账" ng-click = "deleteOrder()">
                    	                                <img alt="删除方式图标" src="dist/images/del.png">
                    	                            </a>
                    	                        </td>
                    	                        <td ng-if="vpay.audit_res == 1" >
                    	                            <span ng-if = "vpay.pay_type == 0 || vpay.pay_type == 1">
                    	                                <a href="javascript:;" title="查看新单详情" ng-click = "checknew()">
                    	                                    <i class="file text outline icon"></i>
                    	                                </a>                               
                    	                            </span>
                    	                            <span ng-if = "vpay.pay_type == 2">
                    	                                <a href="javascript:;" title="查看续费详情" ng-click = "xufei_check()">
                    	                                    <i class="file text outline icon"></i>
                    	                                </a>                               
                    	                            </span>
                    	                            <span ng-if = "vpay.pay_type == 3">
                    	                                <a href="javascript:;" title="查看退款详情" ng-click = "reback_check()">
                    	                                    <i class="file text outline icon"></i>
                    	                                </a>                               
                    	                            </span>
                    	                        </td>
                                                <td ng-if="vpay.audit_res == 1"></td>
                    	                    </tr>
                    	                    <tr ng-show="(payslist && payslist.length == 0) ||(!payslist)">
                    	                        <td colspan="9" style="color:red;">
                    	                            <p style="text-align:center;">还没有找到数据~~~</p>
                    	                        </td>
                    	                    </tr>
                					  </tbody>
            					</table>
                            <div ng-show="payspage.pageAll > 1" class="ui borderless pagination menu" jspagination   page-object="payspage" page-func="getPaysList" ></div>    				
                        </div>
                    <!--分页-->
                    </div>			
                </div>
        </div>
 </div>
 <!--内容区结束-->

<!-- 脚部结束 -->

 <!--弹框开始-->
 <div class="ui add modal">
  <i class="close icon"></i>
  <div class="header_h4">
   添加新单查账
  </div>
  <div class="content">
    <div class="ui borderless form segment">
        <form action="#" name="frm-addnew" id="frm-addnew">
        <div class="ui form">
            <div class="fields">
                <div class="four wide field required">
                  <label>客户姓名</label>
                  <input type="text" name="customer_name" maxlength="20" placeholder="客户姓名">
                </div>
                <div class="four wide field required">
                  <label>电话号码</label>
                  <input type="text" name="customer_phone" maxlength="11" placeholder="电话号码">
                </div>
                <div class="four wide field">
                  <label>所在地</label>
                  <input type="text" name="customer_location"   placeholder="所在地">
                </div>
                <div class="two wide field">
                    <label>性别</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_sex">
                        <div class="default text">请选择客户性别</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="0">未知</div>
                                <div class="item" data-value="1">男</div>
                                <div class="item" data-value="2">女</div>
                            </div>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="three wide required field">
                  <label>资金量(单位：万)</label>
                  <input type="text" name="customer_mount" maxlength="7" placeholder="资金量">
                </div>
                <div class="three wide field">
                  <label>QQ</label>
                  <input type="text" name="customer_qq" maxlength="20" placeholder="QQ">
                </div>
                <div class="four wide field">
                  <label>微信ID</label>
                  <input type="text" name="customer_weixin_id" maxlength="20" placeholder="微信ID">
                </div>
                <div class="four wide field">
                  <label>微信昵称</label>
                  <input type="text" name="customer_weixin_nickname" maxlength="20" placeholder="微信昵称">
                </div>
            </div>
            <div class="fields">
                <div class="six wide field">
                    <label>职业信息</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_career">
                        <div class="default text">请选择职业信息</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{ca.k}}" ng-repeat="ca in careerTypes ">{{ca.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="six wide field">
                    <label>受教育程度</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_education">
                        <div class="default text">未知</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{edu.k}}" ng-repeat="edu in educationTypes">{{edu.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="field">
                    <label>出生日期</label>
                    <div class="ui left icon input">
                      <input type="text"  name="customer_birth"  ng-model="data_new.birthday" onclick="laydate({istime:false, format: 'YYYY-MM-DD'})"/>
                      <i class="calendar icon"></i>
                    </div>
                </div>
                <div class="six wide required field">
                    <label>来源渠道</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_source">
                        <div class="default text">未知</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vsource.source_id}}" ng-repeat="vsource in pageParam.sources">{{vsource.name}}</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">通讯地址</div>
                  <input type="text" name="customer_address" placeholder="通讯地址">
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">客户备注信息</div>
                  <input type="text" name="customer_note" placeholder="备注信息">
                </div>
            </div>
            <div class="ui hidden divider"></div>
            <div class="four fields">
                <div class="field required">
                    <label>订购产品</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_product">
                        <div class="default text">请选择订购的产品</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vp.product_id}}" ng-repeat="vp in pageParam.products_twice" ng-click = "Upgrade_Proudct($index)">{{vp.product_name}}</div>
                        </div>
                    </div>
                </div>
                <div class="field required">
                    <label>报价</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_price">
                        <div class="default text" id = "xufei_neworder">请选择产品报价信息</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{va.price_id}}" ng-repeat="va in connectionNew">{{va.price_name}}</div>
                        </div>
                    </div>
                </div>

                <div class="field required">
                  <label>合同开始时间</label>
                  <input type="text" name="contract_start_time" ng-model="data_new.contract_time" placeholder="合同开始时间" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})">
                </div>
                <div class="three wide field required">
                  <label>购买数量</label>
                  <input type="text" name="customer_buycount"  placeholder="购买数量">
                </div>
            </div>
            <div class="ui hidden divider"></div>
            <div class="inline fields">
                <div class="seven wide field required">
                  <label>服务人员 </label>
                      <input type="hidden" name="customer_sales" id="customer_sales" />
                      <div angucomplete-alt id="customer_user"
                      placeholder="输入服务人员姓名"
                      maxlength="50"
                      name="customer_user"
                      pause="100"
                      selected-object="selectXufei"
                      local-data="pageParam.xufei"
                      search-fields="nickname"
                      title-field="nickname"
                      minlength="1"
                      input-class="form-control form-control-small"
                      match-class="highlight"></div>
                    </div>                      
                <div class="six wide field">
                    <label>客户所属部门</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_sector" data-value="{{user.sector_id}}">
                        <div class="default text">默认为你的部门</div>
                            <i class="dropdown icon"></i>
                            <div class="menu" >
                                <div class="item" data-value="{{vitem.sector_id}}" ng-repeat="vitem in pageParam.sectors|tree2Arr:'_child'" >{{vitem.rep}}{{vitem.sector_name}}</div>
                            </div>
                    </div>
                </div>
              </div>
            <div class="ui hidden divider"></div>
            <div class="fields">
                <div class="three wide field required">
                  <label>付款人</label>
                  <input type="text" name="pay_name"  placeholder="付款人">
                </div>
                <div class="three wide field required">
                  <label>付款金额</label>
                  <input type="text" name="pay_mount" placeholder="付款金额">
                </div>
                <div class="six wide field required">
                    <label>付款方式</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="pay_way">
                        <div class="default text">请选择付款方式</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{vp.k}}" ng-repeat="vp in pageParam.payways">{{vp.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="field required">
                    <label>付款时间</label>
                    <div class="ui left icon input">
                      <input type="text"  name="pay_time"  id="pay_time" ng-model="data_new.pay_time" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm'})" />
                      <i class="calendar icon"></i>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">付款备注信息</div>
                  <input type="text" name="note" placeholder="付款备注信息">
                </div>
            </div>
        </div>
    </form>
    </div>
    </div>
    <div class="actions" style="padding-bottom:50px;">
        <div class="center">
            <div class="ui pop_btn_qd positive">确定</div>          
            <div class="ui pop_btn_qx negative">取消</div>               
        </div>
    </div>
</div>

<!--  添加续费查账 -->
<div class="ui xufei modal">
  <i class="close icon"></i>
  <div class="header_h4">
   添加续费查账
  </div>
    <div class="content">
    <div class="ui borderless form segment">
        <form action="#" name="frm-addxufei" id="frm-addxufei">
        <div class="ui form">
            <div class="inline fields">
                <div id="test_No" class="seven wide field required">
                  <label>续费客户</label>
                  <input type="hidden" name="xufei[customer_id]" ng-model="data_xufei.customer_id" id="xufei_customer" />
                  <div angucomplete-alt id="xufei[customer_name]"
                  placeholder="输入服务人员姓名"
                  maxlength="50"
                  name="xufei[customer_name]"
                  pause="100"
                  selected-object="selectCustomer"
                  local-data="pageParam.customers "
                  search-fields="nickname"
                  title-field="nickname"
                  minlength="1"
                  input-class="form-control form-control-small"
                  match-class="highlight"></div>
                 <div id="add_sty" ></div>                 
                </div>
            </div>
            <div class="ui attached message" ng-if="customerVerify == 1">
                    <span  type="hidden" id="d_time" ng-model="d_times"></span>
                    <div class="header">客户信息</div>
                    <p>客户:{{customerInfo.customer_name}}&nbsp;服务人员:{{customerInfo.service_name}}&nbsp;合同报价:{{customerInfo.mount}}</p>
                    <p>订购产品: {{customerInfo.product_name}}&nbsp;合同开始时间:{{customerInfo.start_time|limitTo:10:0}}&nbsp;结束时间:{{customerInfo.end_time|limitTo:10:0}}</p>
                    <p>合同备注信息:{{customerInfo.note}}</p>
                    <p>是否打印:
                    <span ng-if="customerInfo.is_print == 0"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;"></span>
                    <span ng-if="customerInfo.is_print == 1"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;" checked="checked"></span>
                    是否收回:<span ng-if="customerInfo.is_recycle == 0"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;"></span>
                    <span ng-if="customerInfo.is_recycle == 1"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;" checked="checked"></span></p>
                    <p>电子合同:{{customerInfo.backcontract}}
                        <span> <a href="">查看电子版合同</a></span>
                    </p>
                    <p>合同状态:                
                    <span ng-if = "customerInfo.state == -1" style="color:red;">合同取消</span>
                    <!-- 不正常的合同到期 -->
                    <span ng-if = "customerInfo.state == 0">待审核</span>
                    <span ng-if = "customerInfo.state == 1">进行中</span>
                    <span ng-if = "customerInfo.state == 2" style="color:red;">已经终止</span>
                    <!-- 只交了一部分钱合同到期 -->
                    <span ng-if = "customerInfo.state == 3" style="color:red">已完成</span></p> 
                     <!--全数交钱合同到期  -->
            </div>
            <div class="ui attached message" ng-if="customerVerify == 0" style="color:red;">
                您的客户还没有与公司签订合同
            </div>
            <div class="ui hidden divider"></div>
            <div class="four fields">
                <div class="field required">
                    <label>订购产品</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="xufei[product]" ng-model="data_xufei.product">
                        <div class="default text">请选择订购的产品</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vp.product_id}}" ng-repeat="vp in pageParam.products_twice" ng-click = "Upgrade_Proudct($index)">{{vp.product_name}}</div>
                        </div>
                    </div>
                </div>
                <div class="field required">
                    <label>报价</label>
                    <div class="ui selection dropdown">
                        <input type="hidden"  name="xufei[price]" ng-model="data_xufei.price">
                        <div class="default text" id = "xufei_price">请选择产品报价信息</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vp.price_id}}" ng-repeat="vp in connection">{{vp.price_name}}</div>
                        </div>
                    </div>
                </div>
                <div class="field required">
                  <label>合同开始时间</label>
                  <input type="text" name="xufei[contract_start_time]" ng-model="data_xufei.contract_start_time" placeholder="合同开始时间"
                   onclick="laydate({istime: true, format: 'YYYY-MM-DD'})">
                </div>
                <div class="field required">
                  <label>购买数量</label>
                  <input type="text" name="xufei[customer_buycount]" ng-model="data_xufei.customer_buycount" placeholder="购买数量">
                </div>
                <div style="display:inline-block;">
                    <div class="field required"  id="xufei_type_add">
                        <label>续费类型</label>
                        <div class="ui selection dropdown">
                            <input type="hidden" name="xufei[xufei_type]" ng-model="data_xufei.xufei_type" id="xufei[xufei_type]">
                            <div class="default text" id="xufei[xufei_type]_text">请选择续费类型</div>
                                <i class="dropdown icon"></i>
                                <div class="menu">
                                    <div class="item" data-value="0" value="0">补款</div>
                                    <div class="item" data-value="1" value="1">前续</div>
                                    <div class="item" data-value="2" value="2">后续</div>
                                </div>
                        </div>
                        <!-- <div id="xufei_add_sty"></div>                     -->
                    </div>    
                    <div id="xufei_add_sty" style="display:inline-block;"></div>                  
                </div>
            </div>
            <div class="ui hidden divider"></div>
            <div class="fields">
                <div class="three wide field required">
                  <label>付款人</label>
                  <input type="text"  name="xufei[pay_name]" ng-model="data_xufei.pay_name"  placeholder="付款人">
                </div>
                <div class="three wide field required">
                  <label>付款金额</label>
                  <input type="text"  name="xufei[pay_mount]" ng-model="data_xufei.pay_mount" placeholder="付款金额">
                </div>
                <div class="six wide field required">
                    <label>付款方式</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="xufei[pay_way]" ng-model="data_xufei.pay_way" >
                        <div class="default text">请选择付款方式</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{vp.k}}" ng-repeat="vp in  pageParam.payways">{{vp.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="field required">
                    <label>付款时间</label>
                    <div class="ui left icon input">
                      <input type="text"  name="xufei[pay_time]" id="xufei_pay_time"  ng-model="data_xufei.pay_time"  onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm'})" />
                      <i class="calendar icon"></i>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">付款备注信息</div>
                  <input type="note" placeholder="付款备注信息" name="xufei[note]" ng-model="data_xufei.note">
                </div>
            </div>
        </div>
    </form>
    </div>
    </div>
    <div class="actions" style="padding-bottom: 50px;">
        <div class="center">
            <div class="ui pop_btn_qd positive">确定</div>          
            <div class="ui pop_btn_qx negative">取消</div>    
        </div>

    </div>
</div>
<!-- 编辑新单查账 -->
<div class="ui edit modal">
  <i class="close icon"></i>
  <div class="header_h4">
    编辑新单查账
  </div>
    <div class="ui borderless form segment">
        <form action="#" name="frm-editnew" id="frm-editnew">
        <div class="ui form">
            <div class="fields">
                <span id="customer_id_span" type = "hidden" ng-model = "customer_name_cat"></span>
                <div class="four wide field required">
                  <label>客户姓名</label>
                  <input type="text" name="customer_name_edit"  id="customer_name_edit" maxlength="20" placeholder="客户姓名">
                </div>
                <div class="four wide field required">
                  <label>电话号码</label>
                  <input type="text" name="customer_phone_edit" id="customer_phone_edit" maxlength="11" placeholder="电话号码">
                </div>
                <div class="four wide field">
                  <label>所在地</label>
                  <input type="text" name="customer_location_edit"   id="customer_location_edit" placeholder="所在地">
                </div>
                <div class="two wide field">
                    <label>性别</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_sex_edit" id="customer_sex_edit">
                        <div class="text" id="customer_sex_edit1">请选择客户性别</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="0">未知</div>
                                <div class="item" data-value="1">男</div>
                                <div class="item" data-value="2">女</div>
                            </div>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="three wide required field">
                  <label>资金量(单位：万)</label>
                  <input type="text" name="customer_mount_edit"  id="customer_mount_edit" maxlength="7" placeholder="资金量">
                </div>
                <div class="three wide field">
                  <label>QQ</label>
                  <input type="text" name="customer_qq_edit"  id="customer_qq_edit"  maxlength="20" placeholder="QQ">
                </div>
                <div class="four wide field">
                  <label>微信ID</label>
                  <input type="text" name="customer_weixin_id_edit"   id="customer_weixin_id_edit" maxlength="20" placeholder="微信ID">
                </div>
                <div class="four wide field">
                  <label>微信昵称</label>
                  <input type="text" name="customer_weixin_nickname_edit"  id="customer_weixin_nickname_edit" maxlength="20" placeholder="微信昵称">
                </div>
            </div>
            <div class="fields">
                <div class="six wide field">
                    <label>职业信息</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_career_edit" id="customer_career_edit">
                        <div class="text" id="customer_career_edit1">请选择职业信息</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{ca.k}}" ng-repeat="ca in careerTypes ">{{ca.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="six wide field">
                    <label>受教育程度</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_education_edit" id="customer_education_edit">
                        <div class="text" id="customer_education_edit1"></div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{edu.k}}" ng-repeat="edu in educationTypes">{{edu.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="field">
                    <label>出生日期</label>
                    <div class="ui left icon input">
                      <input type="text"  name="customer_birth_edit" id="customer_birth_edit" ng-model="data_new.birthday" onclick="laydate({istime:false, format: 'YYYY-MM-DD'})"/>
                      <i class="calendar icon"></i>
                    </div>
                </div>
                <div class="six wide required field">
                    <label>来源渠道</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_source_edit" id="customer_source_edit">
                        <div class="text" id="customer_source_edit1"></div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vsource.source_id}}" ng-repeat="vsource in pageParam.sources">{{vsource.name}}</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">通讯地址</div>
                  <input type="text" name="customer_address_edit" id="customer_address_edit" placeholder="通讯地址">
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">客户备注信息</div>
                  <input type="text" name="customer_note_edit"  id="customer_note_edit" placeholder="备注信息">
                </div>
            </div>
            <div class="ui hidden divider"></div>
            <div class="four fields">
                <div class="field required">
                    <label>订购产品</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_product_edit" id="customer_product_edit">
                        <div class="text" id="customer_product_edit1">请选择订购的产品</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vp.product_id}}" ng-repeat="vp in pageParam.products_twice" ng-click = "Upgrade_Proudct($index)">{{vp.product_name}}</div>
                        </div>
                    </div>
                </div>
                <div class="field required">
                    <label>报价</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_price_edit" id="customer_price_edit">
                        <div class="text" id="customer_price_edit1">请选择产品报价信息</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vp.price_id}}" ng-repeat="vp in connectionNew">{{vp.price_name}}</div>
                        </div>
                    </div>
                </div>

                <div class="field required">
                  <label>合同开始时间</label>
                  <input type="text" name="contract_start_time_edit" id="contract_start_time_edit" ng-model="data_new.contract_time" placeholder="合同开始时间" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})">
                </div>
                <div class="three wide field required">
                  <label>购买数量</label>
                  <input type="text" name="customer_buycount_edit" id="customer_buycount_edit" placeholder="购买数量">
                </div>
            </div>
            <div class="ui hidden divider"></div>
            <div class="inline fields">
                <div class="seven wide field required">
                  <label>服务人员 </label>
                  <input type="hidden" name="customer_sales_edit" id="customer_sales_edit" />
                  <div angucomplete-alt id="customer_buycount1"
                  placeholder="输入服务人员姓名"
                  maxlength="50"
                  name="customer_sales_edit"
                  pause="100"
                  selected-object="selectXufei1"
                  local-data="pageParam.xufei"
                  search-fields="nickname"
                  title-field="nickname"
                  minlength="1"
                  input-class="form-control form-control-small"
                  match-class="highlight"></div>
                </div>
                <div class="six wide field">
                    <label>客户所属部门</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_sector_edit" id="customer_sector_edit"  data-value="{{user.sector_id}}">
                        <div class="text" id="customer_sector_edit1">默认为你的部门</div>
                            <i class="dropdown icon"></i>
                            <div class="menu" >
                                <div class="item" data-value="{{vitem.sector_id}}" ng-repeat="vitem in pageParam.sectors|tree2Arr:'_child'" >{{vitem.rep}}{{vitem.sector_name}}</div>
                            </div>
                    </div>
                </div>
              </div>
            <div class="ui hidden divider"></div>
            <div class="fields">
                <div class="three wide field required">
                  <label>付款人</label>
                  <input type="text" name="pay_name_edit" id="pay_name_edit" placeholder="付款人">
                </div>
                <div class="three wide field required">
                  <label>付款金额</label>
                  <input type="text" name="pay_mount_edit"  id="pay_mount_edit" placeholder="付款金额">
                </div>
                <div class="six wide field required">
                    <label>付款方式</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="pay_way_edit" id="pay_way_edit">
                        <div class="text" id="pay_way_edit1">请选择付款方式</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{vp.k}}" ng-repeat="vp in pageParam.payways">{{vp.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="field required">
                    <label>付款时间</label>
                    <div class="ui left icon input">
                      <input type="text"  name="pay_time_edit"  id="pay_time_edit" ng-model="data_new.pay_time" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm'})" />
                      <i class="calendar icon"></i>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">付款备注信息</div>
                  <input type="text" name="note_edit" id="note_edit" placeholder="付款备注信息">
                </div>
            </div>
        </div>
    </form>
    </div>
    <div class="actions" style="padding-bottom: 50px;">
        <div class="center">
            <div class="ui pop_btn_qd positive">确定</div>          
            <div class="ui pop_btn_qx negative">取消</div>          
        </div>

    </div>
</div>

<!-- 编辑续费查账 -->
<div class="ui xufei_edit modal">
  <i class="close icon"></i>
  <div class="header_h4">
    编辑续费查账
  </div>
    <div class="ui borderless form segment">
        <form action="#" name="frm-editxufei" id="frm-editxufei">
        <div class="ui form">
            <div class="inline fields">
                <div id="test_No_xufei" class="seven wide field required">
                  <label>续费客户</label>
                  <input type="hidden" name="xufei[customer_id]_edit" ng-model="data_xufei.customer_id" id="xufei_customer_edit" />
                  <div angucomplete-alt id="xufei_customer_edit1"
                  placeholder="输入服务人员姓名"
                  maxlength="50"
                  name="xufei[customer_name]_edit"
                  pause="100"
                  selected-object="selectCustomer1"
                  local-data="pageParam.customers "
                  search-fields="nickname"
                  title-field="nickname"
                  minlength="1"
                  input-class="form-control form-control-small"
                  match-class="highlight"></div>
                  <div id="add_sty_xufei"></div>
                </div>
            </div>
            <div class="ui attached message" ng-if="customerVerify1 == 1">
                <div class="header">客户信息</div>
                <p>客户:{{customerInfo1.customer_name}}&nbsp;服务人员:{{customerInfo1.service_name}}&nbsp;合同报价:{{customerInfo1.mount}}</p>
                <p>订购产品: {{customerInfo1.product_name}}&nbsp;合同开始时间:{{customerInfo1.start_time|limitTo:10:0}}&nbsp;结束时间:{{customerInfo1.end_time|limitTo:10:0}}</p>
                <p>合同备注信息:{{customerInfo1.note}}</p>
                <p>是否打印:
                <span ng-if="customerInfo1.is_print == 0"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;"></span>
                <span ng-if="customerInfo1.is_print == 1"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;" checked="checked"></span>
                是否收回:<span ng-if="customerInfo1.is_recycle == 0"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;"></span>
                <span ng-if="customerInfo1.is_recycle == 1"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;" checked="checked"></span></p>
                <p>电子合同:{{customerInfo1.backcontract}}
                    <span> <a href="">查看电子版合同</a></span>
                </p>
                    <p>合同状态:                
                    <span ng-if = "customerInfo1.state == -1" style="color:red;">合同取消</span>
                    <!-- 不正常的合同到期 -->
                    <span ng-if = "customerInfo1.state == 0">待审核</span>
                    <span ng-if = "customerInfo1.state == 1">进行中</span>
                    <span ng-if = "customerInfo1.state == 2" style="color:red;">已经终止</span>
                    <!-- 只交了一部分钱合同到期 -->
                    <span ng-if = "customerInfo1.state == 3" style="color:red">已完成</span></p> 
            </div>
            <div class="ui attached message" ng-if="customerVerify1 == 0" style="color:red;">
                您的客户还没有与公司签订合同
            </div>
            <div class="ui hidden divider"></div>
            <div class="four fields">
                <div class="field required">
                    <label>订购产品</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="xufei[product]_edit" id="xufei_product_edit" ng-model="data_xufei.product">
                        <div class="text" id="xufei_product_edit1">请选择订购的产品</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vp.product_id}}" ng-repeat="vp in pageParam.products_twice" ng-click = "Upgrade_Proudct($index)">{{vp.product_name}}</div>
                        </div>
                    </div>
                </div>
                <div class="field required">
                    <label>报价</label>
                    <div class="ui selection dropdown">
                        <input type="hidden"  name="xufei[price]_edit" id="xufei_price_edit" ng-model="data_xufei.price">
                        <div class="text" id="xufei_price_edit1">请选择产品报价信息</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vp.price_id}}" ng-repeat="vp in connection">{{vp.price_name}}</div>
                        </div>
                    </div>
                </div>
                <div class="field required">
                  <label>合同开始时间</label>
                  <input type="text" name="xufei[contract_start_time]_edit" id="xufei_contract_start_time_edit" ng-model="data_xufei.contract_start_time" placeholder="合同开始时间"
                   onclick="laydate({istime: true, format: 'YYYY-MM-DD'})">
                </div>
                <div class="field required">
                  <label>购买数量</label>
                  <input type="text" name="xufei[customer_buycount]_edit" id="xufei_customer_buycount_edit" ng-model="data_xufei.customer_buycount" placeholder="购买数量">
                </div>
                <div style="display:inline-block;">
                    <div class="field required">
                        <label>续费类型</label>
                        <div class="ui selection dropdown">
                            <input type="hidden" name="xufei[xufei_type]_edit" id="xufei_type_edit" ng-model="data_xufei.xufei_type" >
                            <div class="text" id="xufei_xufei_type_edit1">请选择续费类型</div>
                                <i class="dropdown icon"></i>
                                <div class="menu">
                                    <div class="item" data-value="0" value="0">补款</div>
                                    <div class="item" data-value="1" value="1">前续</div>
                                    <div class="item" data-value="2" value="2">后续</div>
                                </div>
                        </div>
                    </div> 
                    <div id="xufei_type_add_xufei" style="display:inline-block;"></div>                   
                </div>

            </div>
            <div class="ui hidden divider"></div>
            <div class="fields">
                <div class="three wide field required">
                  <label>付款人</label>
                  <input type="text"  name="xufei[pay_name]_edit" id="xufei_pay_name_edit" ng-model="data_xufei.pay_name"  placeholder="付款人">
                </div>
                <div class="three wide field required">
                  <label>付款金额</label>
                  <input type="text"  name="xufei[pay_mount]_edit" id="xufei_pay_mount_edit" ng-model="data_xufei.pay_mount" placeholder="付款金额">
                </div>
                <div class="six wide field required">
                    <label>付款方式</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="xufei[pay_way]_edit" id="xufei_pay_way_edit" ng-model="data_xufei.pay_way" >
                        <div class="text" id="xufei_pay_way_edit1">请选择付款方式</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{vp.k}}" ng-repeat="vp in  pageParam.payways">{{vp.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="field required">
                    <label>付款时间</label>
                    <div class="ui left icon input">
                      <input type="text"  name="xufei[pay_time]_edit" id="xufei_pay_time_edit"  ng-model="data_xufei.pay_time"  onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm'})" value="" />
                      <i class="calendar icon"></i>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">付款备注信息</div>
                  <input type="note" placeholder="付款备注信息" name="xufei[note]_edit" id="xufei_note_edit" ng-model="data_xufei.note" value="">
                </div>
            </div>
            <input type="hidden" name="payrecord_id" id="payrecord_id">
        </div>
    </form>
    </div>
    <div class="actions" style="padding-bottom: 50px;">
        <div class="center">
            <div class="ui pop_btn_qd positive">确定</div>          
            <div class="ui pop_btn_qx negative">取消</div>          
        </div>
    </div>
</div>
<!-- 添加退款 -->
<div class="ui feedback modal">
  <i class="close icon"></i>
  <div class="header_h4">
   添加退款
  </div>
    <div class="ui borderless form segment">
        <form action="#" name="frm-feedback" id="frm-feedback">
        <div class="ui form">
            <div class="inline fields">
                <div class="seven wide field">
                  <label>退款客户</label>
                  <input type="hidden" name="customer_fedbak_edit" ng-model="data_xufei.customer_fedbak_edit" id="customer_fedbak"/>
                  <div angucomplete-alt id="customer_fedbak_alt"
                  placeholder="输入昵称/电话号码/微信号"
                  maxlength="50"
                  name="customer_fedbak_alt"
                  pause="100"
                  selected-object="selectCustomer_fedbak"
                  local-data="pageParam.customers_rt"
                  search-fields="nickname,weixin_id,phone"
                  title-field="nickname"
                  minlength="1"
                  input-class="form-control form-control-small"
                  match-class="highlight"></div>
                </div>
            </div>
            <div class="ui attached message" ng-if="customerVerify_fedbak == 1">
                <div class="header">客户信息</div>
                <p>客户:{{customerInfo_fedbak.customer_name}}&nbsp;服务人员:{{customerInfo_fedbak.service_name}}&nbsp;合同报价:{{customerInfo_fedbak.mount}}</p>
                <p>订购产品: {{customerInfo_fedbak.product_name}}&nbsp;合同开始时间:{{customerInfo_fedbak.start_time|limitTo:10:0}}&nbsp;结束时间:{{customerInfo_fedbak.end_time|limitTo:10:0}}</p>
                <p>合同备注信息:{{customerInfo_fedbak.note}}</p>
                <p>是否打印:
                <span ng-if="customerInfo_fedbak.is_print == 0"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;"></span>
                <span ng-if="customerInfo_fedbak.is_print == 1"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;" checked="checked"></span>
                是否收回:<span ng-if="customerInfo_fedbak.is_recycle == 0"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;"></span>
                <span ng-if="customerInfo_fedbak.is_recycle == 1"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;" checked="checked"></span></p>
                <p>电子合同:{{customerInfo_fedbak.backcontract}}
                    <span> <a href="">查看电子版合同</a></span>
                </p>
                <p>合同状态:                
                <span ng-if = "customerInfo_fedbak.state == -1" style="color:red;">合同取消</span>
                <!-- 不正常的合同到期 -->
                <span ng-if = "customerInfo_fedbak.state == 0">待审核</span>
                <span ng-if = "customerInfo_fedbak.state == 1">进行中</span>
                <span ng-if = "customerInfo_fedbak.state == 2" style="color:red;">已经终止</span>
                <!-- 只交了一部分钱合同到期 -->
                <span ng-if = "customerInfo_fedbak.state == 3" style="color:red">已完成</span></p>                 
            </div>
            <div class="ui attached message" ng-if="customerVerify_fedbak == 0" style="color:red;">
                您的客户还没有与公司签订合同
            </div>
            <div class="ui hidden divider"></div>
            <div class="fields">
                <div class="thirteen wide field required">
                  <label>退款金额</label>
                  <input type="text"  name="feedbackmount" ng-model="data.feedbackmount"  placeholder="退款金额">
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">退款备注信息</div>
                  <input type="note" placeholder="退款备注信息" name="feedbacknote" ng-model="data.feedbacknote">
                </div>
            </div>
        </div>
    </form>
    </div>
    <div class="actions">
        <div class="center">
            <div class="ui pop_btn_qd positive">确定</div>          
            <div class="ui pop_btn_qx negative">取消</div>       
        </div>
    </div>
</div>

<!-- 退款编辑界面 -->
<div class="ui editback modal">
  <i class="close icon"></i>
  <div class="header_h4">
   编辑退款
  </div>
    <div class="ui borderless form segment">
        <form action="#" name="frm-editback" id="frm-editback">
        <div class="ui form">
        <input type="hidden" name="payrecord_fed_id" id="payrecord_fed_id">
            <div class="inline fields">
                <div class="seven wide field">
                  <label>退款客户</label>
                  <input type="hidden" name="customer_fedbak_edit" ng-model="data_xufei.customer_fedbak_edit" id="customer_fedbak_edit" />
                  <div angucomplete-alt id="customer_fedbak_alt1"
                  placeholder="输入昵称/电话号码/微信号"
                  maxlength="50"
                  name="customer_fedbak_alt"
                  pause="100"
                  selected-object="selectCustomer"
                  local-data="pageParam.customers "
                  search-fields="nickname,weixin_id,phone"
                  title-field="nickname"
                  minlength="1"
                  input-class="form-control form-control-small"
                  match-class="highlight"></div>
                </div>
            </div>
            <div class="ui attached message" ng-if="customerVerify_fedbak == 1">
                <div class="header">客户信息</div>
                <p>客户:{{customerInfo_fedbak.customer_name}}&nbsp;服务人员:{{customerInfo_fedbak.service_name}}&nbsp;合同报价:{{customerInfo_fedbak.mount}}</p>
                <p>订购产品: {{customerInfo_fedbak.product_name}}&nbsp;合同开始时间:{{customerInfo_fedbak.start_time|limitTo:10:0}}&nbsp;结束时间:{{customerInfo_fedbak.end_time|limitTo:10:0}}</p>
                <p>合同备注信息:{{customerInfo_fedbak.note}}</p>
                <p>是否打印:
                <span ng-if="customerInfo_fedbak.is_print == 0"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;"></span>
                <span ng-if="customerInfo_fedbak.is_print == 1"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;" checked="checked"></span>
                是否收回:<span ng-if="customerInfo_fedbak.is_recycle == 0"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;"></span>
                <span ng-if="customerInfo_fedbak.is_recycle == 1"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;" checked="checked"></span></p>
                <p>电子合同:{{customerInfo_fedbak.backcontract}}
                    <span> <a href="">查看电子版合同</a></span>
                </p>
                <p>合同状态:                
                <span ng-if = "customerInfo_fedbak.state == -1" style="color:red;">合同取消</span>
                <!-- 不正常的合同到期 -->
                <span ng-if = "customerInfo_fedbak.state == 0">待审核</span>
                <span ng-if = "customerInfo_fedbak.state == 1">进行中</span>
                <span ng-if = "customerInfo_fedbak.state == 2" style="color:red;">已经终止</span>
                <!-- 只交了一部分钱合同到期 -->
                <span ng-if = "customerInfo_fedbak.state == 3" style="color:red">已完成</span></p>   
            </div>
            <div class="ui attached message" ng-if="customerVerify_fedbak == 0" style="color:red;">
                您的客户还没有与公司签订合同
            </div>
            <div class="fields">
                <div class="thirteen wide field required">
                  <label>退款金额</label>
                  <input type="text"  name="feedbackmount_edit" ng-model="data.feedbackmount_edit" id="feedbackmount_edit" placeholder="退款金额">
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">退款备注信息</div>
                  <input type="note" placeholder="退款备注信息" name="feedbacknote_eidt" id="feedbacknote_eidt" ng-model="data.feedbacknote_edit">
                </div>
            </div>
        </div>
    </form>
    </div>
    <div class="actions">
        <div class="center">
            <div class="ui pop_btn_qd positive">确定</div>          
            <div class="ui pop_btn_qx negative">取消</div>     
        </div>
    </div>
</div>

<!-- 查看退款详情 -->
<div class="ui fedcheck modal">
  <i class="close icon"></i>
  <div class="header_h4">
   退款审查
  </div>
    <div class="ui borderless form segment">
        <form action="#" name="frm-fedcheck" id="frm-fedcheck">
        <div class="ui form">
            <div class="inline fields">
                    <div class="seven wide field">
                      <label>续费客户</label>
                      <input type="hidden" name="customer_fedbak_check" ng-model="data_xufei.customer_fedbak_check" id="customer_fedbak_check"/>
                      <div angucomplete-alt id="customer_fedbak_check"
                      placeholder="输入昵称/电话号码/微信号"
                      maxlength="50"
                      name="customer_fedbak_alt"
                      pause="100"
                      selected-object="selectCustomer"
                      local-data="pageParam.customers "
                      search-fields="nickname,weixin_id,phone"
                      title-field="nickname"
                      minlength="1"
                      input-class="form-control form-control-small"
                      match-class="highlight"></div>
                    </div>                    
            </div>
            <div class="ui attached message" ng-if="customerInfo_check">
                <div class="header">客户信息</div>
                <p>客户:{{customerInfo_check.customer_name}}&nbsp;服务人员:{{customerInfo_check.service_name}}&nbsp;合同报价:{{customerInfo_check.mount}}</p>
                <p>订购产品: {{customerInfo_check.product_name}}&nbsp;合同开始时间:{{customerInfo_check.start_time|limitTo:10:0}}&nbsp;结束时间:{{customerInfo_check.end_time|limitTo:10:0}}</p>
                <p>合同备注信息:{{customerInfo_check.note}}</p>
                <p>是否打印:
                <span ng-if="customerInfo_check.is_print == 0"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;"></span>
                <span ng-if="customerInfo_check.is_print == 1"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;" checked="checked"></span>
                是否收回:<span ng-if="customerInfo_check.is_recycle == 0"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;"></span>
                <span ng-if="customerInfo_check.is_recycle == 1"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;" checked="checked"></span></p>
                <p>电子合同:{{customerInfo_check.backcontract}}
                    <span> <a href="">查看电子版合同</a></span>
                </p>
                <p>合同状态:
                <span ng-if = "customerInfo_check.state == 0">待审核</span>
                <span ng-if = "customerInfo_check.state == 1">合同已经终止</span>
                <span ng-if = "customerInfo_check.state == 2">合同取消</span>
                <span ng-if = "customerInfo_check.state == 3">合同已经完成</span>
                <span ng-if = "customerInfo_check.state == 4">合同正常状态</span>
                </p>
            </div>
            <div class="ui hidden divider"></div>
            <div class="fields">
                <div class="thirteen wide field required">
                  <label>退款金额</label>
                  <input type="text"  name="feedbackmount_check" ng-model="data.feedbackmount_check" id="feedbackmount_check" placeholder="退款金额" ng-disabled="true">
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">退款备注信息</div>
                  <input type="note" placeholder="退款备注信息" name="feedbacknote_check" id="feedbacknote_check" ng-model="data.feedbacknote_check" ng-disabled="true">
                </div>
            </div>
        </div>
    </form>
    </div>
</div>

<!-- 添加查账查看 -->
<div class="ui newcheck modal">
  <i class="close icon"></i>
  <div class="header_h4">
   新单查账详情
  </div>
    <div class="ui borderless form segment">
        <form action="#" name="frm-checknew" id="frm-checknew">
        <div class="ui form">
            <div class="fields">
                <div class="four wide field required">
                  <label>客户姓名</label>
                  <input type="text" name="customer_name_newcheck" id="customer_name_newcheck" maxlength="20" placeholder="客户姓名">
                </div>
                <div class="four wide field required">
                  <label>电话号码</label>
                  <input type="text" name="customer_phone_newcheck" id="customer_phone_newcheck" maxlength="11" placeholder="电话号码">
                </div>
                <div class="four wide field">
                  <label>所在地</label>
                  <input type="text" name="customer_location_newcheck"  id="customer_location_newcheck" placeholder="所在地">
                </div>
                <div class="two wide field">
                    <label>性别</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_sex">
                        <div class="text" id="customer_sex_newcheck">请选择客户性别</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="0">未知</div>
                                <div class="item" data-value="1">男</div>
                                <div class="item" data-value="2">女</div>
                            </div>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="three wide required field">
                  <label>资金量(单位：万)</label>
                  <input type="text" name="customer_mount_newcheck" id="customer_mount_newcheck" maxlength="7" placeholder="资金量">
                </div>
                <div class="three wide field">
                  <label>QQ</label>
                  <input type="text" name="customer_qq_newcheck" id="customer_qq_newcheck" maxlength="20" placeholder="QQ">
                </div>
                <div class="four wide field">
                  <label>微信ID</label>
                  <input type="text" name="customer_weixin_id_newcheck" id="customer_weixin_id_newcheck" maxlength="20" placeholder="微信ID">
                </div>
                <div class="four wide field">
                  <label>微信昵称</label>
                  <input type="text" name="customer_weixin_nickname_newcheck" id="customer_weixin_nickname_newcheck" maxlength="20" placeholder="微信昵称">
                </div>
            </div>
            <div class="fields">
                <div class="six wide field">
                    <label>职业信息</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_career">
                        <div class="text" id="customer_career_check">请选择职业信息</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{ca.k}}" ng-repeat="ca in careerTypes ">{{ca.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="six wide field">
                    <label>受教育程度</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_education">
                        <div class="text" id="customer_education_newcheck">未知</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{edu.k}}" ng-repeat="edu in educationTypes">{{edu.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="field">
                    <label>出生日期</label>
                    <div class="ui left icon input">
                      <input type="text"  name="customer_birth_newcheck"  id="customer_birth_newcheck" ng-model="data_new.birthday" onclick="laydate({istime:false, format: 'YYYY-MM-DD'})"/>
                      <i class="calendar icon"></i>
                    </div>
                </div>
                <div class="six wide required field">
                    <label>来源渠道</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_source">
                        <div class="text" id="customer_source_newcheck">未知</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vsource.source_id}}" ng-repeat="vsource in pageParam.sources">{{vsource.name}}</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">通讯地址</div>
                  <input type="text" name="customer_address_newcheck" id="customer_address_newcheck" placeholder="通讯地址">
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">客户备注信息</div>
                  <input type="text" name="customer_note_newcheck" id="customer_note_newcheck" placeholder="备注信息">
                </div>
            </div>
            <div class="ui hidden divider"></div>
            <div class="four fields">
                <div class="field required">
                    <label>订购产品</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_product">
                        <div class="text" id="customer_product_newcheck">请选择订购的产品</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vp.product_id}}" ng-repeat="vp in pageParam.products">{{vp.name}}</div>
                        </div>
                    </div>
                </div>
                <div class="field required">
                    <label>报价</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_price">
                        <div class="text" id="customer_price_newcheck">请选择产品报价信息</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vp.price_id}}" ng-repeat="vp in pageParam.prices">{{vp.name}}</div>
                        </div>
                    </div>
                </div>
                <div class="field required">
                  <label>合同开始时间</label>
                  <input type="text" name="contract_start_time_newcheck" id="contract_start_time_newcheck" ng-model="data_new.contract_time" placeholder="合同开始时间" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})">
                </div>
                <div class="three wide field required">
                  <label>购买数量</label>
                  <input type="text" name="customer_buycount_newcheck" id="customer_buycount_newcheck" placeholder="购买数量">
                </div>
            </div>
            <div class="ui hidden divider"></div>
            <div class="inline fields">
                <div class="seven wide field required">
                  <label>服务人员 </label>
                      <input type="hidden" name="customer_sales_newcheck" id="customer_sales_newcheck" />
                      <div angucomplete-alt id="customer_user_newcheck"
                      placeholder="输入服务人员姓名"
                      maxlength="50"
                      name="customer_user"
                      pause="100"
                      selected-object="selectXufei"
                      local-data="pageParam.xufei"
                      search-fields="nickname"
                      title-field="nickname"
                      minlength="1"
                      input-class="form-control form-control-small"
                      match-class="highlight"></div>
                    </div>                      
                <div class="six wide field">
                    <label>客户所属部门</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="customer_sector_newcheck"  data-value="{{user.sector_id}}">
                        <div class="text" id="customer_sector_newcheck">默认为你的部门</div>
                            <i class="dropdown icon"></i>
                            <div class="menu" >
                                <div class="item" data-value="{{vitem.sector_id}}" ng-repeat="vitem in pageParam.sectors|tree2Arr:'_child'" >{{vitem.rep}}{{vitem.sector_name}}</div>
                            </div>
                    </div>
                </div>
              </div>
            <div class="ui hidden divider"></div>
            <div class="fields">
                <div class="three wide field required">
                  <label>付款人</label>
                  <input type="text" name="pay_name_newcheck"  id="pay_name_newcheck" placeholder="付款人">
                </div>
                <div class="three wide field required">
                  <label>付款金额</label>
                  <input type="text" name="pay_mount_newcheck" id="pay_mount_newcheck" placeholder="付款金额">
                </div>
                <div class="six wide field required">
                    <label>付款方式</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="pay_way">
                        <div class="text" id="pay_way_newcheck">请选择付款方式</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{vp.k}}" ng-repeat="vp in pageParam.payways">{{vp.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="field required">
                    <label>付款时间</label>
                    <div class="ui left icon input">
                      <input type="text"  name="pay_time_newcheck"  id="pay_time_newcheck" ng-model="data_new.pay_time" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm'})" />
                      <i class="calendar icon"></i>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">付款备注信息</div>
                  <input type="text" name="note_newcheck" id="note_newcheck" placeholder="付款备注信息">
                </div>
            </div>
        </div>
    </form>
    </div>
</div>

<!-- 添加续费查看 -->
<div class="ui xufeicheck modal">
  <i class="close icon"></i>
  <div class="header_h4">
   查看续费详情
  </div>
    <div class="ui borderless form segment">
        <form action="#" name="frm-checkxufei" id="frm-checkxufei">
        <div class="ui form">
            <div class="inline fields">
                <div class="seven wide field required" >
                  <label>续费客户</label>
                  <input type="hidden" name="xufei[customer_id]_check" ng-model="data_xufei.customer_id_check" id="xufei_customer_check" />
                  <div angucomplete-alt id="xufei_customer_name_check"
                  placeholder="输入服务人员姓名"
                  maxlength="50"
                  name="xufei[customer_name]_check"
                  pause="100"
                  selected-object="selectCustomer"
                  local-data="pageParam.customers "
                  search-fields="nickname"
                  title-field="nickname"
                  minlength="1"
                  input-class="form-control form-control-small"
                  match-class="highlight"></div>
                </div>
            </div>
            <div class="ui attached message" ng-if="customerInfo_check">
                <div class="header">客户信息</div>
                <p>客户:{{customerInfo_check.customer_name}}&nbsp;服务人员:{{customerInfo_check.service_name}}&nbsp;合同报价:{{customerInfo.mount}}</p>
                <p>订购产品: {{customerInfo_check.product_name}}&nbsp;合同开始时间:{{customerInfo_check.start_time|limitTo:10:0}}&nbsp;结束时间:{{customerInfo.end_time|limitTo:10:0}}</p>
                <p>合同备注信息:{{customerInfo_check.note}}</p>
                <p>是否打印:
                <span ng-if="customerInfo_check.is_print == 0"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;"></span>
                <span ng-if="customerInfo_check.is_print == 1"><input type="checkbox" name="Cprint" id="Cprint" style="margin-top:4px;" checked="checked"></span>
                是否收回:<span ng-if="customerInfo_check.is_recycle == 0"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;"></span>
                <span ng-if="customerInfo_check.is_recycle == 1"><input type="checkbox" name="Crecyle" id="Crecyle" style="margin-top:4px;" checked="checked"></span></p>
                <p>电子合同:{{customerInfo_check.backcontract}}
                    <span> <a href="">查看电子版合同</a></span>
                </p>
                <p>合同状态:                
                <span ng-if = "customerInfo_check.state == 0">待审核</span>
                <span ng-if = "customerInfo_check.state == 1">合同已经终止</span>
                <span ng-if = "customerInfo_check.state == 2">合同取消</span>
                <span ng-if = "customerInfo_check.state == 3">合同已经完成</span>
                <span ng-if = "customerInfo_check.state == 4">合同正常状态</span></p>
            </div>
            <div class="ui hidden divider"></div>
            <div class="four fields">
                <div class="field required">
                    <label>订购产品</label>
                    <div class="ui selection dropdown">
                        <input type="hidden" name="xufei[product]_check" ng-model="data_xufei.product_check">
                        <div class="text" id="xufei_productcheck_text">请选择订购的产品</div>
                        <i class="dropdown icon"></i>
                        <div class="menu" ng-disabled = "true">
                            <div class="item" data-value="{{vp.product_id}}" ng-repeat="vp in pageParam.products" ng-click = "Upgrade_Proudct($index)">{{vp.name}}</div>
                        </div>
                    </div>
                </div>
                <div class="field required">
                    <label>报价</label>
                    <div class="ui selection dropdown">
                        <input type="hidden"  name="xufei[price]_check" ng-model="data_xufei.price_check">
                        <div class="text" id = "xufei_price_text">请选择产品报价信息</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="{{vp.price_id}}" ng-repeat="vp in connection">{{vp.price_name}}</div>
                        </div>
                    </div>
                </div>
                <div class="field required">
                  <label>合同开始时间</label>
                  <input type="text" name="xufei[contract_start_time]_check"  id="xufei_contractstart_time_check" ng-model="data_xufei.contract_start_time_check" placeholder="合同开始时间"
                   onclick="laydate({istime: true, format: 'YYYY-MM-DD'})">
                </div>
                <div class="field required">
                  <label>购买数量</label>
                  <input type="text" name="xufei[customer_buycount]_check" id="xufei_customer_buycount_check" ng-model="data_xufei.customer_buycount_check" placeholder="购买数量">
                </div>
                <div style="display:inline-block;">
                    <div class="field required"  id="xufei_type_check">
                        <label>续费类型</label>
                        <div class="ui selection dropdown">
                            <input type="hidden" name="xufei[xufei_type]_check" ng-model="data_xufei.xufei_type_check" id="xufei[xufei_type]_check">
                            <div class="text" id="xufei_xufeitype_text">请选择续费类型</div>
                                <i class="dropdown icon"></i>
                                <div class="menu">
                                    <div class="item" data-value="0" value="0">补款</div>
                                    <div class="item" data-value="1" value="1">前续</div>
                                    <div class="item" data-value="2" value="2">后续</div>
                                </div>
                        </div>               
                    </div>                   
                </div>
            </div>
            <div class="ui hidden divider"></div>
            <div class="fields">
                <div class="three wide field required">
                  <label>付款人</label>
                  <input type="text"  name="xufei[pay_name]_check"  id="xufei_payname_check" ng-model="data_xufei.pay_name_check"  placeholder="付款人">
                </div>
                <div class="three wide field required">
                  <label>付款金额</label>
                  <input type="text"   name="xufei[pay_mount]_check" id="xufei_paymount_check" ng-model="data_xufei.pay_mount_check" placeholder="付款金额">
                </div>
                <div class="six wide field required">
                    <label>付款方式</label>
                    <div class="ui selection dropdown" >
                        <input type="hidden" name="xufei[pay_way]_check" ng-model="data_xufei.pay_way_check" >
                        <div class="text" id="xufei_paystyle_check">请选择付款方式</div>
                            <i class="dropdown icon"></i>
                            <div class="menu">
                                <div class="item" data-value="{{vp.k}}" ng-repeat="vp in  pageParam.payways">{{vp.v}}</div>
                            </div>
                    </div>
                </div>
                <div class="field required">
                    <label>付款时间</label>
                    <div class="ui left icon input">
                      <input type="text"  name="xufei[pay_time]_check" id="xufei_pay_time_check"  ng-model="data_xufei.pay_time_check"  onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm'})" />
                      <i class="calendar icon"></i>
                    </div>
                </div>
            </div>
            <div class="fields">
                <div class="ui labeled input thirteen wide field">
                  <div class="ui label">付款备注信息</div>
                  <input type="note"  placeholder="付款备注信息" name="xufei_note_check"  id="xufei_note_check" ng-model="data_xufei.note_check">
                </div>
            </div>
        </div>
    </form>
    </div>
</div> 
<!-- 删除弹框 -->
<div class="ui small del modal transition"  id="del_feedback" >
  <i class="close icon"></i>
  <div class="header_h4">
   确定删除查账信息？
  </div>
    <div class="content">
        <p></p>
    </div>
    <div class="actions">
        <div class="center">
            <div class="ui pop_btn_qd positive">确定</div>          
            <div class="ui pop_btn_qx negative">取消</div>       
        </div>
    </div>
</div>

<!-- 系统信息弹出层 is ending here-->
<div class="ui systemerror modal transition ">
    <div class="header_h4 ">系统提示</div>
    <div class="content ">
        <div class="inline fluid fields ">
            <div class="field " style="display: inline-block;width: 5%; " ng-show="paysrcode == 1 ">
                <i class="thumbs up large icon "></i>
            </div>
            <div class="field " style="display: inline-block;width: 5%; " ng-show="paysrcode == 0 ">
                <i class="thumbs down large icon "></i>
            </div>
            <div class="field " style="display: inline-block; ">
                <p>{{paysMsg}}</p>
            </div>
        </div>
        <div class="actions " style="padding:14px; ">
            <div class="center " style="margin-bottom:10px; ">
                <div class="ui pop_btn_qx negative ">关闭</div>
            </div>
        </div>
    </div>
</div>
<!-- 系统信息弹出层 is ending here-->
<script type="text/javascript">
    $(function(){
        $('.ui.dropdown').dropdown();
        $.fn.form.settings.rules.oneuser = function(value) {
                var isValid = false;
                var _field = this[0].name;
                if( !value )
                    return true;
                var scope = angular.element( $(this)).scope();
                $.ajax({
                    async : false,
                    url : scope.baseUrl + "/pays/oneuser",
                    type : "POST",
                    data : {
                        field:_field,
                        data:value
                    },
                    dataType: "json",
                    success: function(d ) {
                        if(d && d.rcode )
                            isValid = true;
                    }
                });
            return isValid;
        };
        // 编辑oneuser
        $.fn.form.settings.rules.oneuser_edit = function(value) {
                var isValid = false;
                var _field = this[0].name;
                if( !value )
                    return true;
                var scope = angular.element( $(this)).scope();
                var customer_id = scope.customer_name_cat;
                // var customer_name_js = $('#customer_name_edit').val();
                $.ajax({
                    async : false,
                    url : scope.baseUrl + "/pays/oneuser_edit",
                    type : "POST",
                    data : {
                        field:_field,
                        data:value,
                        id :customer_id
                        // name:customer_name_js
                    },
                    dataType: "json",
                    success: function(d ) {
                        // console.log(d);
                        if(d && d.rcode)
                            isValid = true;
                    }
                });
            return isValid;
        };


        // 添加新单查账
        $('#frm-addnew').form({
            inline:true,
            on: 'blur',
            fields: {
                customer_name:{
                identifier: 'customer_name',
                rules: [
                  {
                   type   : 'empty',
                    prompt : '客户昵称不能为空'
                  },{
                    type:'oneuser',
                    prompt:'该客户的姓名已经存在'
                  }
                ]},

               customer_phone:{
                identifier: 'customer_phone',
                rules: [
                  {
                    type   : 'length[11]',
                    prompt : '请输入正确人电话号码格式'
                  },
                  {
                    type:'oneuser',
                    prompt:'该电话号码已经被使用'
                  }
                ]},
                customer_mount:{
                identifier: 'customer_mount',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '客户资金量不能为空'
                  }
                ]},
                customer_source:{
                identifier: 'customer_source',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '客户来源渠道不能为空'
                  }
                ]},
                customer_user:{
                identifier: 'customer_user',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '服务人员不能为空'
                  }
                ]},
                pay_name:{
                identifier: 'pay_name',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '付款人不能为空'
                  }
                ]},
                pay_mount:{
                identifier: 'pay_mount',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '付款金额不能为空'
                  }
                ]},
                pay_way:{
                identifier: 'pay_way',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请选择付款方式'
                  }
                ]},
                pay_time:{
                identifier: 'pay_time',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请填写付款时间'
                  }
                ]},
                customer_price:{
                identifier: 'customer_price',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '产品报价不能为空'
                  }
                ]},
                customer_sales:{
                  identifier: 'customer_sales',
                  rules: [
                    {
                      type   : 'empty',
                      prompt : '服务人员不能为空'
                    }
                ]},
                customer_product:{
                identifier: 'customer_product',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '客户购买产品不能为空'
                  }
                ]},
                contract_start_time:{
                identifier: 'contract_start_time',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '合同开始时间不能为空'
                  }
                ]},
                customer_buycount:{
                identifier: 'customer_buycount',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '产品购买数量不能为空'
                  }
                ]},
                customer_qq:{
                identifier: 'customer_qq',
                optional   : true,
                rules: [
                  {
                    type   : 'integer',
                    prompt : '请输入正确的QQ号码'
                  },{
                    type:'oneuser',
                    prompt:'该QQ的客户已经存在'
                  }
                ]},
                customer_weixin_id:{
                identifier: 'customer_weixin_id',
                optional   : true,
                rules: [
                  {
                    type   : 'empty',
                    prompt : '客户微信ID不能为空'
                  },
                  {
                    type:'oneuser',
                    prompt:'该微信ID已经注册用户'
                  }
                ]},
            }});

        //新单查账编辑
       $('#frm-editnew').form({
            inline:true,
            on: 'blur',
            fields: {
                customer_name_edit:{
                identifier: 'customer_name_edit',
                rules: [
                  {
                   type   : 'empty',
                    prompt : '客户昵称不能为空'
                  },{
                    type:'oneuser_edit',
                    prompt:'该客户的姓名已经存在'
                  }
                ]},

               customer_phone_edit:{
                identifier: 'customer_phone_edit',
                rules: [
                  {
                    type   : 'length[11]',
                    prompt : '请输入正确人电话号码格式'
                  },
                  {
                    type:'oneuser_edit',
                    prompt:'该电话号码已经被使用'
                  }
                ]},
                customer_mount_edit:{
                identifier: 'customer_mount_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '客户资金量不能为空'
                  }
                ]},
                customer_source_edit:{
                identifier: 'customer_source_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '客户来源渠道不能为空'
                  }
                ]},
                customer_user_edit:{
                identifier: 'customer_user_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '服务人员不能为空'
                  }
                ]},
                pay_name_edit:{
                identifier: 'pay_name_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '付款人不能为空'
                  }
                ]},
                pay_mount_edit:{
                identifier: 'pay_mount_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '付款金额不能为空'
                  }
                ]},
                pay_way_edit:{
                identifier: 'pay_way_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请选择付款方式'
                  }
                ]},
                pay_time_edit:{
                identifier: 'pay_time_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请填写付款时间'
                  }
                ]},
                customer_price_edit:{
                identifier: 'customer_price_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '产品报价不能为空'
                  }
                ]},
                customer_sales_edit:{
                  identifier: 'customer_sales_edit',
                  rules: [
                    {
                      type   : 'empty',
                      prompt : '服务人员不能为空'
                    }
                ]},
                customer_product_edit:{
                identifier: 'customer_product_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '客户购买产品不能为空'
                  }
                ]},
                contract_start_time_edit:{
                identifier: 'contract_start_time_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '合同开始时间不能为空'
                  }
                ]},
                customer_buycount_edit:{
                identifier: 'customer_buycount_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '产品购买数量不能为空'
                  }
                ]},
                customer_qq_edit:{
                identifier: 'customer_qq_edit',
                optional   : true,
                rules: [
                  {
                    type   : 'integer',
                    prompt : '请输入正确的QQ号码'
                  },{
                    type:'oneuser_edit',
                    prompt:'该QQ的客户已经存在'
                  }
                ]},
                customer_weixin_id_edit:{
                identifier: 'customer_weixin_id_edit',
                optional   : true,
                rules: [
                  {
                    type   : 'empty',
                    prompt : '客户微信ID不能为空'
                  },
                  {
                    type:'oneuser_edit',
                    prompt:'该微信ID已经注册用户'
                  }
                ]},
            }}); 

        //添加续费查账 
        $('#frm-addxufei').form({
            inline:true,
            on: 'blur',
            fields: {
              customer: {
                identifier: 'xufei[customer_id]',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请选择要续费的客户'
                  }
                ]},
                pay_name:{
                identifier: 'xufei[pay_name]',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '付款人不能为空'
                  }
                ]},
                pay_mount:{
                identifier: 'xufei[pay_mount]',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '付款金额不能为空'
                  }
                ]},
                pay_way:{
                identifier: 'xufei[pay_way]',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请选择付款方式'
                  }
                ]},
                pay_time:{
                identifier: 'xufei[pay_time]',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请填写付款时间'
                  }
                ]},
                price:{
                identifier: 'xufei[price]',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '产品报价不能为空'
                  }
                ]},
                product:{
                identifier: 'xufei[product]',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '客户购买产品不能为空'
                  }
                ]},
                contract_start_time:{
                identifier: 'xufei[contract_start_time]',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '合同开始时间不能为空'
                  }
                ]},
                customer_buycount:{
                identifier: 'xufei[customer_buycount]',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '产品购买数量不能为空'
                  }
                ]},
                xufei_type:{
                identifier: 'xufei[xufei_type]',
                // optional   : true,
                rules: [
                  {
                    type   : 'empty',
                    prompt : '续费的类型不能为空'
                  }
                ]}
            }});

        // 编辑续费查账
        $('#frm-editxufei').form({
            inline:true,
            on: 'blur',
            fields: {
              customer: {
                identifier: 'xufei[customer_id]_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请选择要续费的客户'
                  }
                ]},
                pay_name:{
                identifier: 'xufei[pay_name]_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '付款人不能为空'
                  }
                ]},
                pay_mount:{
                identifier: 'xufei[pay_mount]_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '付款金额不能为空'
                  }
                ]},
                pay_way:{
                identifier: 'xufei[pay_way]_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请选择付款方式'
                  }
                ]},
                pay_time:{
                identifier: 'xufei[pay_time]_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请填写付款时间'
                  }
                ]},
                price:{
                identifier: 'xufei[price]_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '产品报价不能为空'
                  }
                ]},
                product:{
                identifier: 'xufei[product]_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '客户购买产品不能为空'
                  }
                ]},
                contract_start_time:{
                identifier: 'xufei[contract_start_time]_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '合同开始时间不能为空'
                  }
                ]},
                customer_buycount:{
                identifier: 'xufei[customer_buycount]_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '产品购买数量不能为空'
                  }
                ]},
                xufei_type:{
                identifier: 'xufei[xufei_type]_edit',
                // optional   : true,
                rules: [
                  {
                    type   : 'empty',
                    prompt : '续费的类型不能为空',
                  }
                ]}
            }});

    //添加退款验证 
      $('#frm-feedback').form({
            inline:true,
            on: 'blur',
            fields: {
              customer_fedbak: {
                identifier: 'customer_fedbak',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请填写付费用户信息'
                  }
                ]},
                feedbackmount:{
                identifier: 'feedbackmount',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '退款金额不能为空'
                  }
                ]},
                feedbacknote:{
                identifier: 'feedbacknote',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '退款信息备注不能为空'
                  }
                ]}


            }});

    //编辑退款验证
      $('#frm-editback').form({
            inline:true,
            on: 'blur',
            fields: {
              customer_fedbak_alt: {
                identifier: 'customer_fedbak_alt',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '请填写付费用户信息'
                  }
                ]},
                feedbackmount_edit:{
                identifier: 'feedbackmount_edit',
                rules: [
                  {
                    type   : 'empty',
                    prompt : '退款金额不能为空'
                  }
                ]}
            }});   
    });
</script>
 
 
 <!--弹框结束-->
 
 
 
 



        